[heft-config-file] Let null reset properties#5195
Merged
dmichon-msft merged 3 commits intomicrosoft:mainfrom Apr 16, 2025
Merged
[heft-config-file] Let null reset properties#5195dmichon-msft merged 3 commits intomicrosoft:mainfrom
dmichon-msft merged 3 commits intomicrosoft:mainfrom
Conversation
octogonz
reviewed
Apr 16, 2025
common/changes/@rushstack/heft-config-file/config-file-null_2025-04-16-00-37.json
Show resolved
Hide resolved
octogonz
reviewed
Apr 16, 2025
iclanton
approved these changes
Apr 16, 2025
common/changes/@microsoft/api-extractor/config-file-null_2025-04-16-01-15.json
Outdated
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Allows configuration files to use the value
nullto reset a property to the behavior it would have if it was not present in the file at all. This is useful when extending another configuration file, for example to delete a task or phase when extending a Heft configuration.Details
If a property is set to
nullin a configuration file, regardless of any specified custom merge behavior, the resulting merged configuration file will omit that property, as if it was not specified in the first place.This follows prior art in TypeScripts tsconfig inheritance, which uses the same method to reset a value to "not specified".
How it was tested
Added a test case in the simple extends scenario for a property that starts with a value but is then set to
nullwhen extended.Impacted documentation
Documentation for heft-config-file. See microsoft/rushstack-websites#278